﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YY.Common
{
    public class EventCommon
    {
        #region 委托更新其它窗体Treeview
        /// <summary>
        /// 更新Treeview控件委托类型
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="arg"></param>
        public delegate void UpdateTreeViewDlgt(object sender, EventArgs arg);

        #region 通用选项Treeview控件委托
        /// <summary>
        /// 通用选项操作回调事件
        /// </summary>
        public static event UpdateTreeViewDlgt OptionUdTVEvnt;
        /// <summary>
        /// 通用选项操作回调处理事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="arg"></param>
        public static void OnOptionUdTVEvnt(object sender, EventArgs arg)
        {
            if (OptionUdTVEvnt != null)
                OptionUdTVEvnt(sender, arg);
        }
        #endregion
        #endregion

        #region 委托更新其它窗体DataGridView
        public delegate void UpdateDataGridViewDlgt(object sender, EventArgs arg);

        #region 用户资料回调委托类型
        public static event UpdateDataGridViewDlgt UserUdDGVEvnt;
        public static void OnUserUdDGVEvnt(object sender, EventArgs arg)
        {
            if (UserUdDGVEvnt != null)
                UserUdDGVEvnt(sender, arg);
        }
        #endregion

        #region 客户资料回调委托类型
        public static event UpdateDataGridViewDlgt ClientUdDGVEvnt;
        public static void OnClientUdDGVEvnt(object sender, EventArgs arg)
        {
            if (ClientUdDGVEvnt != null)
                ClientUdDGVEvnt(sender, arg);
        }
        #endregion

        #region 工作资料回调委托类型
        public static event UpdateDataGridViewDlgt OrderUdDGVEvnt;
        public static void OnOrderUdDGVEvnt(object sender, EventArgs arg)
        {
            if (OrderUdDGVEvnt != null)
                OrderUdDGVEvnt(sender, arg);
        }
        #endregion

        #region 箱号资料回调委托类型
        public static event UpdateDataGridViewDlgt CaseUdDGVEvnt;
        public static void OnCaseUdDGVEvnt(object sender, EventArgs arg)
        {
            if (CaseUdDGVEvnt != null)
                CaseUdDGVEvnt(sender, arg);
        }
        #endregion
        #region 货物资料回调委托类型
        public static event UpdateDataGridViewDlgt CargoUdDGVEvnt;
        public static void OnCargoUdDGVEvnt(object sender, EventArgs arg)
        {
            if (CargoUdDGVEvnt != null)
                CargoUdDGVEvnt(sender, arg);
        }
        #endregion

        #region 费用资料回调委托类型
        public static event UpdateDataGridViewDlgt YSUdDGVEvnt;
        public static void OnYSUdDGVEvnt(object sender, EventArgs arg)
        {
            if (YSUdDGVEvnt != null)
                YSUdDGVEvnt(sender, arg);
        }

        public static event UpdateDataGridViewDlgt YFUdDGVEvnt;
        public static void OnYFUdDGVEvnt(object sender, EventArgs arg)
        {
            if (YFUdDGVEvnt != null)
                YFUdDGVEvnt(sender, arg);
        }
        #endregion

        #region 收支资料回调委托类型
        public static event UpdateDataGridViewDlgt BalanceUdDGVEvnt;
        public static void OnBalanceUdDGVEvnt(object sender, EventArgs arg)
        {
            if (BalanceUdDGVEvnt != null)
                BalanceUdDGVEvnt(sender, arg);
        }
        #endregion

        #region 工作流
        public static event UpdateDataGridViewDlgt WorkFlowUdDGVEvnt;
        public static void OnWorkFlowUdDGVEvnt(object sender, EventArgs arg)
        {
            if (WorkFlowUdDGVEvnt != null)
                WorkFlowUdDGVEvnt(sender, arg);
        }
        #endregion
        #endregion
    }
}
